import request from '@/utils/request'

export function getMaterials() {
  return request({
    url: '/materials',
    method: 'GET'
  })
}
export function addMaterials(data) {
  return request({
    url: '/materials',
    method: 'POST',
    data
  })
}
export function refrushMaterials(data) {
  console.log(data)
  return request({
    url: '/materials',
    method: 'PUT',
    data
  })
}
export function deleteMaterials(id) {
  return request({
    url: `/materials/${id}`,
    method: 'delete'
  })
}
